using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WPCoco;
using WPCoco.UI;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace ParticlesDemo
{
    public class BackNextControl : AffineNode
    {
        public BackNextControl()
        {
            Anchor = Vector2.Zero;
            Width = Screen.Width; Height = 80;
            UIButton backButton = new UIButton(Coco.Load<Texture2D>("Back"));
            backButton.Position = new Vector2(Width / 2 - 100, Height / 2);
            backButton.Action += (s, e) => { DemoManager.BackScene(); };
            AddNode(backButton);
            UIButton nextButton = new UIButton(Coco.Load<Texture2D>("Next"));
            nextButton.Position = new Vector2(Width / 2 + 100, Height / 2);
            nextButton.Action += (s, e) => { DemoManager.NextScene(); };
            AddNode(nextButton);

            UIResponderController rctrl = new UIResponderController(this);
            rctrl.AddResponder(backButton);
            rctrl.AddResponder(nextButton);
        }
    }
}
